package javachongkao.面向对象上.计算年龄;

import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        Birthday  birthday = new Birthday(scanner.nextInt(), scanner.nextInt(), scanner.nextInt());
        System.out.println("age="+birthday.getAge());
    }
}
class Birthday{
    public int getAge(){
        int age;
        age= 2017-year;
        if (month>=12&&day>25){
            age++;
        }
        return age;
    }

    public int getYear() {
        return year;
    }

    public void setYear(int year) {
        this.year = year;
    }

    public int getMonth() {
        return month;
    }

    public void setMonth(int month) {
        this.month = month;
    }

    public int getDay() {
        return day;
    }

    public void setDay(int day) {
        this.day = day;
    }

    private int year;
    private int month;
    private int day;
    public Birthday() {
    }

    public Birthday( int year,int month, int day) {
        this.year = year;
        this.month = month;
        this.day = day;
    }

}